﻿using M.ShopMachine.Domain;
using M.ShopMachine.Domain.Dto;
using M.ShopMachine.Repository.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace M.ShopMachine.Repository.Impl
{
    public class BaseMaintainRepository : BaseRepository<Maintain>, IMaintainRepository
    {
        public BaseMaintainRepository(EFDbContext eFDbcontext) : base(eFDbcontext)
        {
        }

        public async Task<int> AddMaintainAsync(Maintain maintain)
        {
            var id = await base.AddAsync(maintain);
            return id;
        }

        public async Task<List<Maintain>> GetTableMaintainAsync(int id)
        {
            var gather = await base.GetListAsync(x => x.IsDeleted == false);
            return gather.ToList();
        }
    }
}
